Skip to main content

do in widget

Type

command

Summary

Executes a list of statements within a widget.

Syntax

do <script> in <widget>

Description

Use the do in widget command to execute statements in a widget. LiveCode sends a "OnDo" message with script as parameter to the widget, which can then handle that messages to run the code appropriately.

Parameters

NameTypeDescription

script

string

The code to execute within the widget.

widget

A widget reference

Examples

-- Use JavaScript to hide "myButton" in the page displayed in a browser widget.
do "document.getElementById('myButton').hidden = 'hidden'" in widget "myBrowser"

object: widget

command: do

Compatibility and Support

Introduced

LiveCode 8.0

OS

mac

windows

linux

ios

android

Platforms

desktop

mobile

Thank you for your feedback!

Was this page helpful?